#include<stdio.h>
#include"stack.h"

int main()
{
	stacklist_t stack = create_emptystack();
	if (stack) {
		stack_push(stack, 1);
		stack_push(stack, 2);
		stack_push(stack, 3);
		stack_push(stack, 4);
		stack_push(stack, 5);

		printf("data = %d\n", stack_pop(stack));
		printf("data = %d\n", stack_pop(stack));
		printf("data = %d\n", stack_pop(stack));

		make_empty(stack);

		printf("data = %d\n", stack_pop(stack));
		//printf("data = %d\n", stack_pop(stack));
		//printf("data = %d\n", stack_pop(stack));

		destroy_stack(&stack);
		printf("stack = %p\n", stack);
	}

	return 0;
}